package com.dps.omc.agent.queue.consumer.tasker.utils;

import java.io.BufferedReader;
import java.io.IOException;

/**
 * Created by lip on 2016-05-11.
 */
public class LogThread implements Runnable{

    private BufferedReader reader;
    private StringBuffer sb;

    public LogThread(BufferedReader reader,StringBuffer sb)
    {
        this.reader = reader;
        this.sb = sb;
    }

    @Override
    public void run() {
        String buf = null;
        try {
            while ((buf = reader.readLine()) != null) {
                sb.append(buf);
                sb.append("\n");
    //            logger.info("read1:"+buf1);
            }
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}
